package File类;

import java.io.File;
import java.io.IOException;

/*
* public boolean delete() 返回由此抽象路径名表示的文件或目录
* */
public class File类删除功能 {

    public static void main(String[] args) throws IOException, InterruptedException {
        File file = new File("D:\\C3D\\Test\\1.txt");
        boolean newFile = file.createNewFile();
        Thread.sleep(10000);
        boolean delete = file.delete();
        System.out.println("删除标记："+delete);
    }

}